<?php

class Application_Form_Bitacora extends Zend_Form
{

    public function init()
    {

        $this->setMethod('post');
		$this->setAttrib('id', 'ajax_form');


		$this->setDecorators(
			array(	"FormElements",
					array("HtmlTag", array("tag" => "table")),
					"Form"
			)
		);



	    $notas=new Zend_Form_Element_Textarea('notas');
        $notas->setLabel('Descripción')
                ->setRequired(true)
                ->setAttribs(array('rows'=>5,'cols'=>80))
                ->addFilter('StringTrim');



        $sala=new Zend_Form_Element_Text('sala');
        $sala ->setLabel('Sala')
                ->addFilter('StringTrim')
                ->addValidator('StringLength', false,array(0, 50));
                
        $ticket=new Zend_Form_Element_Text('ticket');
        $ticket ->setLabel('Ticket / Proyecto')
                ->addFilter('StringTrim')
                ->addValidator('StringLength', false,array(0, 100));
                
        $contrata=new Zend_Form_Element_Text('contrata');
        $contrata->setLabel('Contrata')
                ->addFilter('StringTrim')
                ->addValidator('StringLength', false,array(0, 100));




        $this->addElement($notas)
            ->addElement(new Sgit_Form_Element_Select_Datacenter('id_zona'))
            ->addElement($sala)
            ->addElement($ticket)
            ->addElement($contrata)
            ->addElement(new Sgit_Form_Element_Select_Xml('BitacoraImpacto'))
            ->addElement(new Sgit_Form_Element_Select_Xml('BitacoraRiesgo'))
            ->addElement(new Sgit_Form_Element_Select_Xml('BitacoraEstado'))
            ->addElement(new Sgit_Form_Element_Fecha('terminado',array('label'=>'Terminado')));
  
  
        
       $this->setElementDecorators(array(
		    'ViewHelper',
		   'Errors',
		    array(array('data' => 'HtmlTag'),	array('tag' => 'td', 'class' => 'element')   ),
		    array('Label', array('tag' => 'td')),
		    array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
		));

       
       

    }
}
